<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="./../assets/css/combined.css">
	<link rel="shortcut icon" href="./../favicon.ico" />
	<script src="http://www.google.com/jsapi" type="text/javascript"></script>
	<script type="text/javascript">
		var path = './../';
		var class_prefix = "Fuel::";
	</script>
	<script src="./../assets/js/combined.js"></script>
	<title>Fuel - Classes - FuelPHP Documentation</title>
</head>
<body>
	<div id="container">
		<header id="header">
			<div class="table">
				<h1>
					<strong>FuelPHP, a PHP 5.3 Framework</strong>
					Documentation
				</h1>

				<form id="google_search">
					<p>
						<span id="search_clear">&nbsp;</span>
						<input type="submit" name="search_submit" id="search_submit" value="search" />
						<input type="text" value="" id="search_input" name="search_input" />
					</p>
				</form>
			</div>
			<nav>

				<div class="clear"></div>
			</nav>
			<a href="#" id="toc_handle">table of contents</a>
			<div class="clear"></div>
		</header>

		<div id="cse">
			<div id="cse_point"></div>
			<div id="cse_content"></div>
		</div>

		<div id="main">

			<h2>Fuel Class</h2>

			<p>
				The Fuel class contains the core methods of the Fuel framework.
				The public methods in this class that can be used in your application are documented here.
				All other methods are for internal use only, and should not be used.</p>

			<h3 id="class_constants">Class constants</h3>

			<p style="margin-bottom:10px;">Environment constants. These are used in your config.php to define the application environment:</p>
			<table class="config">
				<tbody>
					<tr class="header">
						<th>Name</th>
						<th>Type</th>
						<th>Value</th>
						<th>Description</th>
					</tr>
					<tr>
						<th>TEST</th>
						<td>string</td>
						<td><pre class="php"><code>'test'</code></pre></td>
						<td>
							Identifies the TEST environment.
						</td>
					</tr>
					<tr>
						<th>DEVELOPMENT</th>
						<td>string</td>
						<td><pre class="php"><code>'development'</code></pre></td>
						<td>
							Identifies the DEVELOPMENT environment.
						</td>
					</tr>
					<tr>
						<th>STAGING</th>
						<td>string</td>
						<td><pre class="php"><code>'staging'</code></pre></td>
						<td>
							Identifies the STAGING environment.
						</td>
					</tr>
					<tr>
						<th>PRODUCTION</th>
						<td>string</td>
						<td><pre class="php"><code>'production'</code></pre></td>
						<td>
							Identifies the PRODUCTION environment.
						</td>
					</tr>
				</tbody>
			</table>

			<p id="log_constants" style="margin-bottom:10px;">Logging constants. These are used by the <a href="log.html">Log</a> class, and by the function <a href="log.html#function_logger">logger():</a></p>
			<table class="config">
				<tbody>
					<tr class="header">
						<th>Name</th>
						<th>Type</th>
						<th>Value</th>
						<th>Description</th>
					</tr>
					<tr>
						<th>L_NONE</th>
						<td>integer</td>
						<td><pre class="php"><code>0</code></pre></td>
						<td>
							Logging level 0: do not log.
						</td>
					</tr>
					<tr>
						<th>L_ERROR</th>
						<td>integer</td>
						<td><pre class="php"><code>1</code></pre></td>
						<td>
							Indicates an error message is logged.
						</td>
					</tr>
					<tr>
						<th>L_WARNING</th>
						<td>integer</td>
						<td><pre class="php"><code>2</code></pre></td>
						<td>
							Indicates an warning is logged.
						</td>
					</tr>
					<tr>
						<th>L_DEBUG</th>
						<td>integer</td>
						<td><pre class="php"><code>3</code></pre></td>
						<td>
							Indicates a debug message is logged.
						</td>
					</tr>
					<tr>
						<th>L_INFO</th>
						<td>integer</td>
						<td><pre class="php"><code>4</code></pre></td>
						<td>
							Indicates an informational message is logged.
						</td>
					</tr>
					<tr>
						<th>L_ALL</th>
						<td>integer</td>
						<td><pre class="php"><code>5</code></pre></td>
						<td>
							All logging levels.
						</td>
					</tr>
				</tbody>
			</table>

			<p style="margin-bottom:10px;">Other constants:</p>
			<table class="config">
				<tbody>
					<tr class="header">
						<th>Name</th>
						<th>Type</th>
						<th>Value</th>
						<th>Description</th>
					</tr>
					<tr>
						<th>VERSION</th>
						<td>string</td>
						<td><pre class="php"><code>'<script type="text/javascript">document.write(DocVersion);</script>'</code></pre></td>
						<td>
							Version of the current Fuel installation.
						</td>
					</tr>
				</tbody>
			</table>

			<h3>Class properties</h3>

			<p style="margin-bottom:10px;">Note that although these properties are defined as public, you should not alter them without good reason.</p>
			<table class="config">
				<tbody>
					<tr class="header">
						<th>Name</th>
						<th>Static</th>
						<th>Type</th>
						<th>Value</th>
						<th>Description</th>
					</tr>
					<tr>
						<th>$initialized</th>
						<td>yes</td>
						<td>boolean</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							Indicates if the framework has been initialized.
						</td>
					</tr>
					<tr>
						<th>$env</th>
						<td>yes</td>
						<td>string</td>
						<td><pre class="php"><code>Fuel::DEVELOPMENT</code></pre></td>
						<td>
							Environment the framework runs in. Must be one of the environment constants mentioned above.
						</td>
					</tr>
					<tr>
						<th>$profiling</th>
						<td>yes</td>
						<td>boolean</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							If true, the profiler has been enabled.
						</td>
					</tr>
					<tr>
						<th>$locale</th>
						<td>yes</td>
						<td>string</td>
						<td><pre class="php"><code>'en_US'</code></pre></td>
						<td>
							Currently defined locale.
						</td>
					</tr>
					<tr>
						<th>$timezone</th>
						<td>yes</td>
						<td>string</td>
						<td><pre class="php"><code>'UTC'</code></pre></td>
						<td>
							Currently defined timezone.
						</td>
					</tr>
					<tr>
						<th>$encoding</th>
						<td>yes</td>
						<td>string</td>
						<td><pre class="php"><code>'UTF-8'</code></pre></td>
						<td>
							Currently defined character encoding.
						</td>
					</tr>
					<tr>
						<th>$is_cli</th>
						<td>yes</td>
						<td>boolean</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							If true, the framework runs in CLI mode.
						</td>
					</tr>
					<tr>
						<th>$is_test</th>
						<td>yes</td>
						<td>boolean</td>
						<td><pre class="php"><code>false</code></pre></td>
						<td>
							If true, the framework runs in Unit Test mode.
						</td>
					</tr>
				</tbody>
			</table>

			<article>
				<h4 class="method" id="method_load">load($file)</h4>
				<p>The <strong>load</strong> method loads (includes) a given file, and returns the results. This method is used for example to load configuration files, which return an array of configuration settings.</p>
				<table class="method">
					<tbody>
					<tr>
						<th class="legend">Static</th>
						<td>Yes</td>
					</tr>
					<tr>
						<th>Parameters</th>
						<td>
							<table class="parameters">
								<tr>
									<th>Param</th>
									<th>Default</th>
									<th class="description">Description</th>
								</tr>
								<tr>
									<th><kbd>$file</kbd></th>
									<td><i>required</i></td>
									<td>Filename of the file to be loaded</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<th>Returns</th>
						<td>Mixed</td>
					</tr>
					<tr>
						<th>Example</th>
						<td>
							<pre class="php"><code>// load a PHP file
if (Fuel::load('myfile.php'))
{
	echo "MyFile was loaded successfully";
}
</code></pre>
						</td>
					</tr>
					</tbody>
				</table>
				<p class="note"> Note that if the included file does NOT contain a <strong>return</strong> statement, load() will return <strong>1</strong> if the load was successful, or <strong>0</strong> if the file could not be loaded!</p>
			</article>

		</div>

		<footer>
			<p>
				&copy; FuelPHP Development Team 2010-2013 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
			</p>
		</footer>
	</div>
</body>
</html>
